package com.codewsq.exer;

import org.junit.Test;

import java.util.List;

public class DAOTest {

    @Test
    public void test() {
        DAO<User> dao = new DAO<>();
        dao.save("1001", new User(1001, "张三"));
        dao.save("1002", new User(1002, "李四"));
        dao.save("1003", new User(1003, "王五"));

        dao.update("1003", new User(1003, "赵六"));
        dao.remove("1002");
        List<User> list = dao.getDAO();

        list.forEach(System.out::println);
    }
}
